home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / dviselect / postamble.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-16  |  1.9 KB  |  46 lines

  1. /*
  2.  * Copyright (c) 1987 University of Maryland Department of Computer Science.
  3.  * All rights reserved.  Permission to copy for any purpose is hereby granted
  4.  * so long as this copyright notice remains intact.
  5.  */
  6.  
  7. /* Definitions for ScanPostAmble */
  8.  
  9. /*
  10.  * ScanPostAmble reads the postamble of a DVI file from the (stdio)
  11.  * file specified in its first argument.  It is handed two pointers to
  12.  * functions.  The first (ScanPostAmble's second argument) is called
  13.  * after the header information has been read, and given a pointer to a
  14.  * PostAmbleInfo structure.  It is the job of this function to extract the
  15.  * required information from this structure (which is deallocated when
  16.  * ScanPostAmble returns).
  17.  *
  18.  * The second function is called once for each font definition occurring in
  19.  * the postamble, and is given a pointer to a PostAmbleFont structure.  This
  20.  * function should do whatever the device needs to read the actual font.
  21.  *
  22.  * If the DVI file appears malformed, ScanPostAmble will print an error
  23.  * message and exit.  (Drastic, perhaps, but effective.)
  24.  */
  25.  
  26. struct PostAmbleInfo {
  27.     i32    pai_PrevPagePointer;    /* previous page pointer */
  28.     i32    pai_Numerator;        /* numerator from dvi file */
  29.     i32    pai_Denominator;    /* denominator from dvi file*/
  30.     i32    pai_DVIMag;        /* \magnification */
  31.     i32    pai_TallestPageHeight;    /* height of tallest page */
  32.     i32    pai_WidestPageWidth;    /* width of widest page */
  33.     int    pai_DVIStackSize;    /* DVI stack size required */
  34.     int    pai_NumberOfPages;    /* total number of pages in DVI file */
  35. };
  36.  
  37. struct PostAmbleFont {
  38.     char    *paf_name;        /* name of font (null terminated) */
  39.     int     paf_n1;            /* length of first part of name */
  40.     int     paf_n2;            /* length of second part of name */
  41.     i32     paf_DVIFontIndex;    /* font index number */
  42.     i32     paf_DVIChecksum;    /* checksum from DVI file */
  43.     i32     paf_DVIMag;        /* "at size" */
  44.     i32     paf_DVIDesignSize;    /* design size of font */
  45. };
  46.